//
//  QDOrderController.m
//  QuickDoctor
//
//  Created by ycw on 2016/12/26.
//  Copyright © 2016年 Eric. All rights reserved.
//

#import "QDOrderController.h"

@interface QDOrderController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation QDOrderController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"预约医生信息详情";
    
    [self setUpUI];
    

    [self setUpButton];

//    [self setUpBuuton]

    
}

#pragma mark
#pragma mark - 搭建界面

- (void)setUpUI
{
    
    UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
    
    [self.view addSubview:tableView];
    
    [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.edges.equalTo(self.view);
        
    }];
    
    tableView.delegate = self;
    
    tableView.dataSource = self;
    
    [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    
    tableView.tableFooterView = [[UIView alloc] init];
    
}


#pragma mark
#pragma mark - 实现数据源方法

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    
    return cell;
    
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    
    return 1;
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    
    return 5;
    
}

#pragma mark
#pragma mark - 创建底部视图的两个button
- (void) setUpButton
{
    
    UIButton *leftButton = [[UIButton alloc] init];
    
    [leftButton setTitle:@"短信重发" forState:UIControlStateNormal];
    
    leftButton.layer.masksToBounds = YES;
    
    leftButton.layer.cornerRadius = 5;
    
    leftButton.layer.backgroundColor = [UIColor colorWithRed:36/255.0 green:190/255.0 blue:190/255.0 alpha:1].CGColor;
    
    [self.view addSubview:leftButton];
    
    [leftButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.equalTo(self.view).mas_offset(25);
        
        make.bottom.equalTo(self.view).mas_offset(-10);
        
        make.width.mas_equalTo(150);
        
        make.height.mas_equalTo(60);
        
    }];
    
    UIButton *rightButton = [[UIButton alloc] init];
    
    [rightButton setTitle:@"取消预约" forState:UIControlStateNormal];
    
    rightButton.layer.masksToBounds = YES;
    
    rightButton.layer.cornerRadius = 5;
    
    rightButton.layer.backgroundColor = [UIColor colorWithRed:36/255.0 green:190/255.0 blue:190/255.0 alpha:1].CGColor;
    
    [self.view addSubview:rightButton];
    
    [rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.leading.equalTo(leftButton.mas_trailing).mas_offset(30);
        
        make.centerY.equalTo(leftButton);
        
        make.width.mas_equalTo(150);
        
        make.height.mas_equalTo(60);
        
    }];
    
}






@end
